home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Reference & Presen…tion Library 2 (Reseller)
/
Apple R&P Lib Reseller v2.0.iso
/
3-Demos
/
HyperCard Demos
/
HyperMovies
/
CL⁄1
/
CL_1
/
card_5792.txt
< prev
next >
Wrap
Text File
|
1989-10-27
|
5KB
|
215 lines
-- card: 5792 from stack: in
-- bmap block id: 0
-- flags: 4000
-- background id: 3493
-- name: All Regions
----- HyperTalk script -----
-- Script of card "All Regions"
on GetDataForCard cardName
--{ Hide the following for display:
global connectMode
if connectMode = "Simulation" then
S_GetDataForCard cardName
exit GetDataForCard
end if
--}
--put "select manager,quota_ytd,sales_ytd,office_nr,city,region" &&
--"from offices order by office_nr desc; " into query
put "select manager,quota_ytd,sales_ytd,office_nr,city,region" && "from offices order by office_nr; " into query
put "2,3,4,5,6,7" into fieldsToFill
put the short name of me into cardName
PutDataInFields query, fieldsToFill, cardName
end GetDataForCard
--{ Hide the following for display:
on S_GetDataForCard cardName
--for the simulation mode:
put "offices" into tableName
put "manager,quota_ytd,sales_ytd,office_nr,city,region" into fmFields
put "2,3,4,5,6,7" into toFields
if cardName is empty
then put the short name of this card into cardName
put "select" && fmFields && "from" && tableName && "order by office_nr descending; " into s_query
S_PutDataInFields s_query,tableName, selectedRecords(tableName,"office_nr"),fmFields,toFields,cardName
end S_GetDataForCard
function selectedRecords tableName,keyFieldName
set lockScreen to true
set lockMessages to true
push card card
go card tableName
get number of lines of card field keyFieldName
repeat with i = 1 to it
--select all records whose key field is not empty
if line i of card field keyFieldName <> empty then
put i & "," after recordList
end if
end repeat
put empty into last char of recordList
pop card
set lockScreen to false
set lockMessages to false
return recordList
end selectedRecords
--}
-- part 17 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=8 top=7 right=31 bottom=31
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Prev
----- HyperTalk script -----
on mouseUp
visual wipe right
go prev
end mouseUp
-- part 20 (field)
-- low flags: 80
-- high flags: 2004
-- rect: left=16 top=62 right=260 bottom=493
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Card Script
----- HyperTalk script -----
on doSelect
put the mouseV into theClick
put textHeight of me into lineHeight
put rect of me into window
put item 1 of window into left
set the lockText of me to false
click at left, theClick
click at left, theClick + lineHeight with shiftKey
if the selection is not empty then
repeat until return is in the selection
add lineHeight to theClick
click at left, theClick + lineHeight with shiftKey
end repeat
end if
--set the lockText of me to true
end doSelect
-- part 24 (field)
-- low flags: 81
-- high flags: 2000
-- rect: left=19 top=62 right=257 bottom=489
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Card Script Mask
----- HyperTalk script -----
on mouseUp
send doSelect to card field "Card Script"
end mouseUp
-- part contents for background part 1
----- text -----
Data for All Regions
-- part contents for background part 6
----- text -----
manager
-- part contents for background part 7
----- text -----
quota
-- part contents for background part 8
----- text -----
sales
-- part contents for background part 9
----- text -----
percent
-- part contents for background part 16
----- text -----
office_nr
-- part contents for background part 17
----- text -----
city
-- part contents for background part 18
----- text -----
region
-- part contents for background part 26
----- text -----
status
-- part contents for card part 20
----- text -----
-- Script of card "All Regions"
on GetDataForCard
put "select manager, quota_ytd, sales_ytd, office_nr, city, region from offices order by office_nr descending; " into query
put "2,3,4,5,6" into fieldsToFill
put the short name of me into cardName
PutDataInFields query, fieldsToFill, cardName
end GetDataForCard
-- part contents for background part 33
----- text -----
select manager,quota_ytd,sales_ytd,office_nr,city,region from offices order by office_nr descending;
-- part contents for background part 5
----- text -----
114.7,104.3,101.1,82.5,94.6,102.8
-- part contents for background part 2
----- text -----
300,200,800,
-- part contents for background part 3
----- text -----
760000.00,295000.00,638000.00,
-- part contents for background part 4
----- text -----
872446.36,307700.06,
-- part contents for background part 10
----- text -----
105,110,
-- part contents for background part 11
----- text -----
NewYork,Washington,
-- part contents for background part 12
----- text -----
Eastern,Eastern,